<?php

use Illuminate\Database\Seeder;

class ArticleAndAuthor extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        DB::table('article') -> insert([
           [
               'article_name' => 'what',
               'author_id' => rand(1,3)
           ],[
               'article_name' => 'who',
               'author_id' => rand(1,3)
           ],[
               'article_name' => 'why',
               'author_id' => rand(1,3)
           ],
        ]);
        DB::table('author') -> insert([
            [
                'author_name' => 'rmw'
            ],[
                'author_name' => 'hxw'
            ],[
                'author_name' => 'txw'
            ],
        ]);
    }
}
